import request from '@/utils/request'

// 查询收购记录列表
export function listPurchaseRecord(query) {
  return request({
    url: '/console/oms/purchaseRecord/list',
    method: 'get',
    params: query
  })
}

// 查询收购记录详细
export function getPurchaseRecord(id) {
  return request({
    url: '/console/oms/purchaseRecord/' + id,
    method: 'get'
  })
}

// 新增收购记录
export function addPurchaseRecord(data) {
  return request({
    url: '/console/oms/purchaseRecord',
    method: 'post',
    data: data
  })
}

// 修改收购记录
export function updatePurchaseRecord(data) {
  return request({
    url: '/console/oms/purchaseRecord',
    method: 'put',
    data: data
  })
}
// 修改收购记录-订单状态
export function updatePurchaseRecordStatus(data) {
  return request({
    url: '/console/oms/purchaseRecord/updateStatus',
    method: 'put',
    data: data
  })
}

// 删除收购记录
export function delPurchaseRecord(id) {
  return request({
    url: '/console/oms/purchaseRecord/' + id,
    method: 'delete'
  })
}

// 导出收购记录
export function exportPurchaseRecord(query) {
  return request({
    url: '/console/oms/purchaseRecord/export',
    method: 'get',
    params: query
  })
}
